{extend name="publics/base" /}
{block name="body"}
		<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>

			<ul class="breadcrumb">
				<li>
					<i class="icon-home home-icon"></i>
					<a href="{:url('Index/index')}">首页</a>
				</li>
				<li class="active">用户管理</li>
			</ul><!-- .breadcrumb -->
		</div>

		<div class="page-content">
			<div class="page-header">
				<h1>
					用户管理
					<small>
						<i class="icon-double-angle-right"></i>
						 查看用户
					</small>
				</h1>
			</div><!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th>用户id</th>
								<th>用户名</th>
								<th class="hidden-480">邮箱</th>
								<th>
									<i class="icon-time bigger-110 hidden-480"></i>
									上次登录时间
								</th>
								<th>上次登录ip</th>
								<th>上次登录地址</th>
								<th>所属分组</th>
								<th>登录次数</th>
								<th>账号状态</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
						</thead>

						<tbody>
							<!-- 这里展示用户列表 -->
							   {volist name="userList" id="list"}
                            <tr>
                                <td>{$list.id}</td>
                                <td>{$list.name}</td>
                                <td>{$list.email}</td>
                                <td>{$list.last_login_time}</td>
                                <td>{$list.last_login_ip}</td>
                                <td>{$list.last_login_location}</td>
                                <td>{$list.title}</td>
                                <td>{$list.login_num}</td>
                                <td class="hidden-480">
                                {if condition="$list.id neq 1"}
                                    {if condition = "$list.status eq 1"}
                                    <a href="{:url('User/lockUser',['id' => $list.id,'status' => -1])}" title=""><span class="label label-sm label-success">使用中</span></a>
                                    {else}
                                    <a href="{:url('User/lockUser',['id' => $list.id,'status' => 1])}" title=""><span class="label label-sm label-warning">已锁定</span></a>
                                    {/if}
                                {else}
                                    <a href="#" title=""><span class="label label-sm label-success disable">禁止修改</span></a>
                                {/if}
                                </td>
                                <td>{$list.create_time}</td>
                                <td>
                                    <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                        <a class="btn btn-xs btn-info" href="{:url('User/editUser',['id' => $list.id])}">
                                            <i class="icon-edit bigger-120"></i>
                                        </a>
                                        {if condition="$list.id neq 1"}
                                        <a class="btn btn-xs btn-danger" href="{:url('User/delUser',['id' => $list.id])}" onclick="javascript:return confirm('是否要删除本条记录?')">
                                            <i class="icon-trash bigger-120"></i>
                                        </a>
                                        {/if}
                                    </div>
                                </td>
                            </tr>
                            {/volist}
						</tbody>
					</table>
					<div class="col-md-6 col-md-offset-5">
                        {$userList->render()}
                    </div>
				</div>
			</div>
		</div>
{/block}